<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	//项目的发布路径，例如:  /rabc
	String path = request.getContextPath();
	/*
	全路径，形式如下: http://127.0.0.1:8001/rbac/
	request.getScheme()      ——> http 获取协议
	request.getServerName()  --> 127.0.0.1 获取服务名
	request.getServerPort()  --> 8001 获取端口号
	path                     --> /rbac 获取访问的路径 路
	*/
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%-- 
	<base/>标签解决路径问题
	参考文章:http://www.cnblogs.com/muqianying/archive/2012/03/16/2400280.html
--%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">
<meta charset="UTF-8">
<title>登录CRM</title>
<meta name="description" content="这是一个 index 页面">
<meta name="keywords" content="index">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="icon" type="image/png" href="assets/i/favicon.png">
<link rel="apple-touch-icon-precomposed"
	href="assets/i/app-icon72x72@2x.png">
<meta name="apple-mobile-web-app-title" content="Amaze UI" />
<link rel="stylesheet" href="assets/css/amazeui.min.css" />
<link rel="stylesheet" href="assets/css/admin.css">
<link rel="stylesheet" href="assets/css/app.css">
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/amazeui.min.js"></script>
<script src="assets/js/app.js"></script>
<script type="text/javascript">
function f(){
	var account = $("#doc-ipt-email-1").val();
    var password = $("#doc-ipt-pwd-1").val();
    if(account.trim().length==0){
        $("#message").css("font-weight", "blod").css("color", "red");
        $("#message").html("账号不能为空！");
        alert("账号不能为空！");
    }else if(password.trim().length==0){
        $("#message").css("font-weight", "blod").css("color", "red");
        $("#message").html("密码不能为空！");
    }   
	var form = document.getElementById("form");
    form.submit();
}
</script>
</head>

<body data-type="login">

	<div class="am-g myapp-login" style="background-color: #3598dc;">
		<div class="myapp-login-logo-block  tpl-login-max">
			<div class="myapp-login-logo-text">
				<div class="myapp-login-logo-text"></div>
			</div>

			<div class="login-font">
				<i>Log In </i> or <span> Sign Up</span>
			</div>
			<div class="am-u-sm-10 login-am-center">
				<form class="am-form" id="form" action="user/login" method="post">
					<fieldset>
						<div class="am-form-group">
							<input type="email" class="" id="doc-ipt-email-1" value="${account }"  name="account"
								placeholder="输入账号" style="height: 50px;">
						</div>
						<div class="am-form-group">
							<input type="password" class="" id="doc-ipt-pwd-1" name="password"
								placeholder="输入密码" style="height: 50px;">
						</div>
						<p>
							<button type="button" onclick="f()" class="am-btn am-btn-default">登录</button>
						</p>
					</fieldset>
				</form> <font id="message" size="2" color="red">${message }</font>
			</div>
		</div>
	</div>

	
</body>

</html>